import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        // 👇 非严格匹配，/my-page/* 都指向 MyPage 页面
        path: '/',
        name: 'my-page',
        component: () => import('./../views/Index')
    },
    {
        path: '/Page1',
        name: 'Page1',
        component: () => import( './../views/Page1')
    },
    {
        path: '/Page2',
        name: 'Page2',
        component: () => import( './../views/Page2')
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
